<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
  <script type="text/javascript">
    var obj = {
      0: 1,
      1: 2,
      2: 3,
      length: 3
    }

    // length 决定了Array.from最终返回的新数组的长度，剪切或补齐(undefined)
    var arr = Array.from(obj);
    arr.push(4);
    console.log(arr);
    console.log(arr.length);


    var newarr = Array.from(obj, function(item, index){
      return {
        suudentId: this.prefix + item,
        order: index
      }
    },{
      prefix: 'No·'
    })
    console.log(newarr);

  </script>
</body>
</html>